import { inject, injectable } from 'inversify';
import type { EditorMode, IPanelService, IModeRegistry, PanelItem } from '../types';

@injectable()
export class PanelService implements IPanelService {
    constructor(
        @inject('IModeRegistry') private modeRegistry: IModeRegistry
    ) {
        console.log('PanelService initialized with ModeRegistry:', modeRegistry);
    }

    getLeftPanelItems(mode: EditorMode): PanelItem[] {
        console.log('Getting left panel items for mode:', mode);
        const feature = this.modeRegistry.getModeFeature(mode);
        console.log('Mode feature:', feature);
        return feature?.leftPanelItems || [];
    }

    getRightPanelItems(mode: EditorMode): PanelItem[] {
        console.log('Getting right panel items for mode:', mode);
        const feature = this.modeRegistry.getModeFeature(mode);
        console.log('Mode feature:', feature);
        return feature?.rightPanelItems || [];
    }
} 